﻿using System;
using System.Collections.Generic;
using System.Text;

namespace FileSharing
{
    public class Vizinho : Node
    {
        public enum Status
        {
            Connected,
            Known,
            Active,
            Dead
        }

        public Status CurrentStatus { get; set; }

        public DateTime LastNodeLookup { get; set; }
        public bool ReadyForLookup { get; set; }

        public DateTime LastPing { get; set; }
        public bool ReadyForPing { get; set; }
        public ushort PingRequests { get; set; }

        public int ConnectionAttenpts { get; set; }
        public DateTime LastConnectionAttempt { get; set; }

        public Vizinho()
        {
            CurrentStatus = Status.Known;
            LastNodeLookup = new DateTime(0);
            ReadyForLookup = false;
            ReadyForPing = true;
            PingRequests = 0;
            ConnectionAttenpts = 0;
            LastConnectionAttempt = new DateTime(0);
        }
    }
}
